package com.compunit.composite.core.interfaces.xml;

import java.io.IOException;
import java.net.URL;

/**
 * <code>IXMLParser</code> defines the interface of a
 * utility parser unit that is responsible for parsing
 * out all the tags within a XML file.
 *
 * @author Yi Wang (Neakor)
 * @version Creation date: 11-06-2009 18:11 EST
 * @version Modified date: 11-06-2009 18:30 EST
 */
public interface IXMLParser {
	
	/**
	 * Parse the XML linked by the given URL.
	 * @param file The <code>URL</code> links to the
	 * XML file to be parsed.
	 * @throws IOException If file reading is interrupted.
	 */
	public void process(final URL file) throws IOException;
	
	/**
	 * Retrieve the root tag in the processed XML file.
	 * @return The root <code>IXMLTag</code>.
	 */
	public IXMLTag getRoot();
	
	/**
	 * Clean up the cached XML data.
	 */
	public void cleanup();
}
